package com.icss.day081.controller;

import com.icss.day081.po.Employees1;
import com.icss.day081.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

@RestController
public class EmpController {

    @Autowired
    EmpService empService;

    @GetMapping("system/emp")
    public HashMap get(Employees1 po) {

        List<Employees1> elist = empService.searchByCondition(po);

        HashMap map = new HashMap();
        map.put("code", "20000");
        map.put("message", "查询成功");
        map.put("data", elist);
        return map;
    }
}
